package cn.topkinson.rabbitmq.dead.queue.controller;

import cn.topkinson.rabbitmq.dead.queue.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author huangzihao
 * @Date 2020/12/26 19:45
 */
@RestController
public class OrderController {

    @Autowired
    private OrderService orderService;

    //http://127.0.0.1:8567/dlx/order
    @GetMapping("/order")
    public String order() {
        String orderNo = orderService.order();
        System.out.println("创建订单："+orderNo);
        return "订单号："+orderNo;
    }

}
